#!/bin/bash
# create 3 files by date
# such as filename_2021-08-16
#	  filename_2021-08-15
#	  filename_2021-08-14

#read filename
read -p "Pleas enter a filename:" filename
#get today's date
date_today=$(date "+%Y-%m-%d")
date_1_before=$(date -d "1 day ago" "+%Y-%m-%d")
date_2_before=$(date -d "2 day ago" "+%Y-%m-%d")
filename1="${filename}_${date_today}"
filename2="${filename}_${date_1_before}"
filename3="${filename}_${date_2_before}"
touch $filename1
touch $filename2
touch $filename3
exit 0
